package SimpleUploadBulkCMIRPSystem;


/**
 * Generated from IDL interface "SimpleUploadBulkCMIRP".
 *
 * @author JacORB IDL compiler V 2.3.0, 17-Feb-2007
 * @version generated at 2013-5-20 22:07:19
 */

public abstract class SimpleUploadBulkCMIRPPOA
	extends org.omg.PortableServer.Servant
	implements org.omg.CORBA.portable.InvokeHandler, SimpleUploadBulkCMIRPSystem.SimpleUploadBulkCMIRPOperations
{
	static private final java.util.Hashtable m_opsHash = new java.util.Hashtable();
	static
	{
		m_opsHash.put ( "upload", new java.lang.Integer(0));
		m_opsHash.put ( "get_simple_upload_bulk_cm_irp_notification_profile", new java.lang.Integer(1));
		m_opsHash.put ( "get_simple_upload_bulk_cm_irp_operation_profile", new java.lang.Integer(2));
		m_opsHash.put ( "get_simple_upload_bulk_cm_irp_versions", new java.lang.Integer(3));
	}
	private String[] ids = {"IDL:SimpleUploadBulkCMIRPSystem/SimpleUploadBulkCMIRP:1.0"};
	public SimpleUploadBulkCMIRPSystem.SimpleUploadBulkCMIRP _this()
	{
		return SimpleUploadBulkCMIRPSystem.SimpleUploadBulkCMIRPHelper.narrow(_this_object());
	}
	public SimpleUploadBulkCMIRPSystem.SimpleUploadBulkCMIRP _this(org.omg.CORBA.ORB orb)
	{
		return SimpleUploadBulkCMIRPSystem.SimpleUploadBulkCMIRPHelper.narrow(_this_object(orb));
	}
	public org.omg.CORBA.portable.OutputStream _invoke(String method, org.omg.CORBA.portable.InputStream _input, org.omg.CORBA.portable.ResponseHandler handler)
		throws org.omg.CORBA.SystemException
	{
		org.omg.CORBA.portable.OutputStream _out = null;
		// do something
		// quick lookup of operation
		java.lang.Integer opsIndex = (java.lang.Integer)m_opsHash.get ( method );
		if ( null == opsIndex )
			throw new org.omg.CORBA.BAD_OPERATION(method + " not found");
		switch ( opsIndex.intValue() )
		{
			case 0: // upload
			{
			try
			{
				java.lang.String _arg0=_input.read_string();
				java.lang.String _arg1=_input.read_string();
				java.lang.String _arg2=_input.read_string();
				BulkCmIRPConstDefs.SearchControl _arg3=BulkCmIRPConstDefs.SearchControlHelper.read(_input);
				_out = handler.createReply();
				upload(_arg0,_arg1,_arg2,_arg3);
			}
			catch(BulkCmIRPSystem.ConcurrencyException _ex0)
			{
				_out = handler.createExceptionReply();
				BulkCmIRPSystem.ConcurrencyExceptionHelper.write(_out, _ex0);
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex1)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex1);
			}
			catch(BulkCmIRPSystem.UnknownSessionIdException _ex2)
			{
				_out = handler.createExceptionReply();
				BulkCmIRPSystem.UnknownSessionIdExceptionHelper.write(_out, _ex2);
			}
			catch(BulkCmIRPSystem.IllegalFilterFormatException _ex3)
			{
				_out = handler.createExceptionReply();
				BulkCmIRPSystem.IllegalFilterFormatExceptionHelper.write(_out, _ex3);
			}
			catch(BulkCmIRPSystem.IllegalScopeLevelException _ex4)
			{
				_out = handler.createExceptionReply();
				BulkCmIRPSystem.IllegalScopeLevelExceptionHelper.write(_out, _ex4);
			}
			catch(BulkCmIRPSystem.IllegalDNFormatException _ex5)
			{
				_out = handler.createExceptionReply();
				BulkCmIRPSystem.IllegalDNFormatExceptionHelper.write(_out, _ex5);
			}
			catch(BulkCmIRPSystem.NotValidInCurrentStateException _ex6)
			{
				_out = handler.createExceptionReply();
				BulkCmIRPSystem.NotValidInCurrentStateExceptionHelper.write(_out, _ex6);
			}
			catch(BulkCmIRPSystem.MaxSessionReachedException _ex7)
			{
				_out = handler.createExceptionReply();
				BulkCmIRPSystem.MaxSessionReachedExceptionHelper.write(_out, _ex7);
			}
			catch(BulkCmIRPSystem.IllegalURLFormatException _ex8)
			{
				_out = handler.createExceptionReply();
				BulkCmIRPSystem.IllegalURLFormatExceptionHelper.write(_out, _ex8);
			}
			catch(BulkCmIRPSystem.IllegalScopeTypeException _ex9)
			{
				_out = handler.createExceptionReply();
				BulkCmIRPSystem.IllegalScopeTypeExceptionHelper.write(_out, _ex9);
			}
			catch(BulkCmIRPSystem.UploadException _ex10)
			{
				_out = handler.createExceptionReply();
				BulkCmIRPSystem.UploadExceptionHelper.write(_out, _ex10);
			}
				break;
			}
			case 1: // get_simple_upload_bulk_cm_irp_notification_profile
			{
			try
			{
				java.lang.String _arg0=_input.read_string();
				_out = handler.createReply();
				ManagedGenericIRPConstDefs.MethodListHelper.write(_out,get_simple_upload_bulk_cm_irp_notification_profile(_arg0));
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex0)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex0);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex1)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex1);
			}
			catch(SimpleUploadBulkCMIRPSystem.GetSimpleUploadBulkCMIRPNotificationProfileException _ex2)
			{
				_out = handler.createExceptionReply();
				SimpleUploadBulkCMIRPSystem.GetSimpleUploadBulkCMIRPNotificationProfileExceptionHelper.write(_out, _ex2);
			}
				break;
			}
			case 2: // get_simple_upload_bulk_cm_irp_operation_profile
			{
			try
			{
				java.lang.String _arg0=_input.read_string();
				_out = handler.createReply();
				ManagedGenericIRPConstDefs.MethodListHelper.write(_out,get_simple_upload_bulk_cm_irp_operation_profile(_arg0));
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex0)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex0);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex1)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex1);
			}
			catch(SimpleUploadBulkCMIRPSystem.GetSimpleUploadBulkCMIRPOperationProfileException _ex2)
			{
				_out = handler.createExceptionReply();
				SimpleUploadBulkCMIRPSystem.GetSimpleUploadBulkCMIRPOperationProfileExceptionHelper.write(_out, _ex2);
			}
				break;
			}
			case 3: // get_simple_upload_bulk_cm_irp_versions
			{
			try
			{
				_out = handler.createReply();
				ManagedGenericIRPConstDefs.VersionNumberSetHelper.write(_out,get_simple_upload_bulk_cm_irp_versions());
			}
			catch(SimpleUploadBulkCMIRPSystem.GetSimpleUploadBulkCmIRPVersionsException _ex0)
			{
				_out = handler.createExceptionReply();
				SimpleUploadBulkCMIRPSystem.GetSimpleUploadBulkCmIRPVersionsExceptionHelper.write(_out, _ex0);
			}
				break;
			}
		}
		return _out;
	}

	public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte[] obj_id)
	{
		return ids;
	}
}
